//
//  YKPopoverView.h
//  YKKit
//
//  Created by 马洪伟 on 16/1/13.
//  Copyright © 2016年 悦康动力（北京）科技有限公司. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef void (^didHideBlock)();

typedef NS_ENUM(NSInteger, YKPopoverViewAnimation) {
    YKPopoverViewAnimationNone,
    YKPopoverViewAnimationPresent,
    YKPopoverViewAnimationAlert,
    YKPopoverViewAnimationSlideDown,
};

/**
 *  弹出浮层视图，仅作为pop，尽量不要继承！！！
 */
@interface YKPopoverView : UIButton
@property (strong, nonatomic) UIView *contentView;
@property (assign, nonatomic) BOOL disableBackgroundTouch;
@property (copy, nonatomic) didHideBlock hideBlock;

- (YKPopoverView *)initWithContentView:(UIView *)contentView;
- (YKPopoverView *)initWithFrame:(CGRect)frame contentView:(UIView *)contentView;
- (void)showInView:(UIView *)view animation:(YKPopoverViewAnimation)animation;
- (void)dismiss:(BOOL)animation;
@end

extern NSString *YKPopoverViewDismissNotification;
